package com.syezon.wifikey.db;

import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;

import com.syezon.wifikey.pwd.info.SaveWifiPwdInfo;

import java.util.List;

/**
 * Created by Administrator on 2018/9/12.
 */

@Dao
public interface WifiPwdDao {

    @Query("SELECT * FROM t_wifi_pwd")
    List<SaveWifiPwdInfo> getAll();

    @Query("SELECT * FROM t_wifi_pwd WHERE id IN (:ids)")
    List<SaveWifiPwdInfo> loadAllByIds(int[] ids);
//
//    @Query("SELECT * FROM t_wifi_pwd WHERE first_name LIKE :first AND " + "last_name LIKE :last LIMIT 1")
//    SaveWifiPwdInfo findByName(String first, String last);

    @Insert
    void insertAll(SaveWifiPwdInfo... saveWifiPwdInfos);

    @Delete
    void delete(SaveWifiPwdInfo saveWifiPwdInfo);

    @Update
    void update(SaveWifiPwdInfo saveWifiPwdInfo);
}
